import xbmc
import xbmcgui
import xbmcaddon
import persistence
import view

if __name__ == '__main__':
	
	databaseMgr = persistence.DatabaseMgr()
	scheduleMgr = persistence.ScheduleMgr()
	episodeMgr = persistence.EpisodeMgr()
	mainWindowView = view.MainWindowView("main.xml", xbmcaddon.Addon().getAddonInfo('path').decode('utf-8'), "default", "720p")
	mainWindowView.setup(databaseMgr, scheduleMgr, episodeMgr)
	mainWindowView.run()

#	url = "smb://MYBOOKLIVE/Public/Shared Videos/TV/Rome/Rome Season 1 (2005)/S01E01 - The Stolen Eagle.mkv"	
#	xbmc.Player(xbmc.PLAYER_CORE_MPLAYER ).play(url)	


